home *** CD-ROM | disk | FTP | other *** search
/ Item MB Quick & Easy 2.0 / Item MB Quick & Easy 2.0.iso / mbfacad / eaitproi.lsp < prev    next >
Text File  |  1998-03-15  |  11KB  |  240 lines

  1. ;---------Unterfunktion zur Profilzeichnung für Kanalelemente
  2. ;--------------------------------------------------------------------------
  3. ; Wird neues Profil erstellt, trage die Liste mit den Punkten der Quer-    
  4. ; linien ein (siehe erstes SETQ) und füge eine entsprechende Zeile in der  
  5. ; ersten COND - Anweisung ein !!!!                                         
  6. ;                                                                          
  7. ; PROFIL muß eine String entsprechend aus erster COND- Anweisung sein      
  8. ; EPKT   ist Einfügepkt.                                                  
  9. ; LA     ist Laenge des Profils                                             
  10. ; WIN    ist Einfügewinkel                                                 
  11. ; KRI    ist Konstruktionswinkel                                           
  12. ;--------------------------------------------------------------------------
  13.  
  14. (defun EAITproI (PROFIL EPKT LA WIN KRI / SS1 LI LI1 LI2 LI3 LI4 LI5 LI6 LI7 LI8 LI9
  15.                                           LIN END1 WIZ N Z)
  16.                                
  17. ;--------Listen der Profil-Linien                               
  18.  
  19.        (setvar "OSMODE" 0)
  20.        (setq LI1 '(40)
  21.              LI2 '(80)
  22.              LI3 '(9.5)
  23.              LI4 '(120)
  24.              LI5 '(160)
  25.              LI6 '(19.7 21)
  26.              LI7 '(59.7 61)
  27.              LI8 '(99.7 101)
  28.              LI9 '(139.7 141)
  29.              LI10 '(40 49.5)
  30.              LI11 '(40 80)
  31.              LI12 '(40 160)
  32.              LI13 '(40)
  33.              LI14 '(80)
  34.              LI15 '(16)
  35.              LI16 '(16 24 33 36 38.5 41.5 44 47 56 64 80)
  36.              LI17 '(7.5 12.5 17.5 22.5 27.5 32.5 37.5 42.5 47.5 52.5 57.5 62.5 67.5 72.5 80)
  37.              LI18 '(7.5 12.5 18.75 21.25 38.75 41.25 47.5 52.5 58.75 61.25 67.5 72.5 78.75 81.25 98.75 101.25 107.5 112.5 120)
  38.              LI19 '(16 24 33 36 38.5 41.5 44 47 56 64 73 76 78.5 81.5 84 87 96 104 120)
  39.              LI20 '(10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 120)
  40.              LI21 '(4.5 6.5 8.75 11.25 13.5 16.5 18.5 21.5 23.5 26.5 28.5 31.5 33.5 36.5 38.5 41.5 43.5 46.5 48.5 51.5 53.5 56.5 58.5 61.5 63.5 66.5 68.5 71.5 73.5 76.5 78.5 81.5 83.5 86.5 88.5 91.5 93.5 96.5 98.5 
  41.                     101.5 103.5 106.5 108.5 111.5 113.5 116.5 118.5 121.5 123.5 126.5 128.5 131.5 133.5 136.5 138.5 141.5 143.5 146.5 148.5 151.5 153.5 156.5 158.5 161.5 163.5 166.5 168.5 171.5 173.5 176.5 178.5 181.5 183.5 186.5 188.75 191.25 193.5 195.5 200)
  42.        )
  43.  
  44.        (cond ((= PROFIL "T40")(setq LI LI1))           ;Traegerprofil 40 breite Seite
  45.              ((= PROFIL "T80")(setq LI LI2))           ;Traegerprofil 80 breite Seite   
  46.              ((= PROFIL "TS")(setq LI LI3))            ;Traegerprofile schmale Seite
  47.              ((= PROFIL "T120")(setq LI LI4))          ;Traegerprofil 120 breite Seite 
  48.              ((= PROFIL "T160")(setq LI LI5))          ;Traegerprofil 160 breite Seite 
  49.              ((= PROFIL "W40")(setq LI LI6))           ;Wandprofil 40 breite Seite
  50.              ((= PROFIL "W80")(setq LI LI7))           ;Wandprofil 80 breite Seite
  51.              ((= PROFIL "W120")(setq LI LI8))          ;Wandprofil 120 breite Seite
  52.              ((= PROFIL "W160")(setq LI LI9))          ;Wandprofil 160 breite Seite
  53.              ((= PROFIL "T80-45S")(setq LI LI10))      ;Traegerprofil 80-45° schmale Seite
  54.              ((= PROFIL "T80-45B")(setq LI LI11))      ;Traegerprofil 80-45° Breite Seite
  55.              ((= PROFIL "T120-45B")(setq LI LI12))     ;Traegerprofil 80-45° Breite Seite
  56.              ((= PROFIL "D40")(setq LI LI13))          ;Deckelprofil 40 breite Seite   
  57.              ((= PROFIL "D80")(setq LI LI14))          ;Deckelprofil 80 breite Seite   
  58.              ((= PROFIL "VBL")(setq LI LI15))          ;Verblendprofil
  59.              ((= PROFIL "EGL120")(setq LI LI16))       ;Elektronikgeh. 120 links
  60.              ((= PROFIL "EGR120")(setq LI LI17))       ;Elektronikgeh. 120 rechts
  61.              ((= PROFIL "EGU120")(setq LI LI18))       ;Elektronikgeh. 120 unten
  62.              ((= PROFIL "EGL200")(setq LI LI19))       ;Elektronikgeh. 200 links
  63.              ((= PROFIL "EGR200")(setq LI LI20))       ;Elektronikgeh. 200 rechts
  64.              ((= PROFIL "EGU200")(setq LI LI21))       ;Elektronikgeh. 200 unten
  65.        );cond
  66.  
  67. ;---------Bedingungen für Quadranten    
  68.  
  69.        (cond ((AND (<= WIN KRI)(< KRI (+ WIN(/ Pi 2))));I. Quadrant
  70.                        (setq WIN WIN                         ;
  71.                              WIZ (+ WIN (/ Pi 2))            ; 
  72.                        )                                     ;
  73.                 )                                         ;I. Quadrant
  74.  
  75.                 ((AND (<= (+ WIN(/ Pi 2)) KRI)(< KRI (+ WIN Pi))); II. Quadrant 
  76.                        (setq WIN (+ WIN Pi)                         ;
  77.                              WIZ (- WIN (/ Pi 2))                   ;
  78.                        )                                            ;
  79.                  )                                                ; II. Quadrant
  80.  
  81.                 ((AND (<= (+ WIN Pi) KRI)(< KRI (+ WIN (/(* Pi 3)2)))); III.Quadrant
  82.                        (setq WIN (+ WIN Pi)                              ;
  83.                              WIZ (+ WIN (/ Pi 2))                        ;
  84.                        )                                                 ;
  85.                  )                                                     ; III. Quadrant
  86.                 (T                                                  ; IV. Quadrant
  87.                        (setq WIN WIN                                     ;
  88.                              WIZ (- WIN (/ Pi 2))                        ;
  89.                        )                                                 ;
  90.                 )                                                   ; IV. Quadrant
  91.        );cond            
  92.        (setq WINFO (/ (+ WIN WIZ) 2))     ;Winkel für MB-INFO - Punkt
  93.  
  94. ;-----------Zeichnen der Profil-Grundlinie    
  95. (cond ((= "W" (substr PROFIL 1 1))
  96.  
  97.        (command EAITlay EAITlse "EAIT50" "")
  98.        (setq EPKT (polar EPKT WIZ 9.5)
  99.              P1 EPKT
  100.              END1 (polar EPKT WIN LA)
  101.        )    
  102.        (command EAITlin EPKT END1 "")
  103.        (setq LIN (entlast)
  104.              SS1 (ssadd (entlast))
  105.              Z -1
  106.        )    
  107.  
  108. ;-----------Zeichnen des restlichen Profils    
  109.  
  110.        (foreach N LI
  111.                (command EAITkop LIN "" EPKT (polar EPKT WIZ N))
  112.                (setq SS1 (ssadd (entlast) SS1))
  113.                (setq Z (1+ Z))
  114.        );foreach
  115.     
  116.        (command EAITlin EPKT (polar EPKT WIZ (nth Z LI)) "") ;Seiten-Linie d. Profils
  117.        (setq SS1 (ssadd (entlast) SS1))
  118.        (command EAITlin END1 (polar END1 WIZ (nth Z LI)) "") ;Seiten-Linie d. Profils
  119.        (setq SS1 (ssadd (entlast) SS1))
  120.  
  121.     );cond "W"
  122.     
  123.     ((= "T80-45S" PROFIL)
  124.  
  125.        (command EAITlay EAITlse "EAIT50" "")
  126.        (setq END1 (polar EPKT WIN LA))    
  127.        (command EAITlin EPKT END1 "")
  128.        (setq LIN (entlast)
  129.              SS1 (ssadd (entlast))
  130.              Z 0
  131.        )    
  132.  
  133. ;-----------Zeichnen des restlichen Profils    
  134.  
  135.        (command EAITlay EAITlse "EAIT25" "")
  136.        (command EAITlin (polar EPKT WIZ (nth Z LI))(polar END1 WIZ (nth Z LI)) "")
  137.        (setq SS1 (ssadd (entlast) SS1))
  138.        (setq Z (1+ Z))
  139.        (command EAITlay EAITlse "EAIT50" "")
  140.        (command EAITlin (polar EPKT WIZ (nth Z LI))(polar END1 WIZ (nth Z LI)) "")
  141.        (setq SS1 (ssadd (entlast) SS1))
  142.     
  143.        (command EAITlin EPKT (polar EPKT WIZ (nth Z LI)) "") ;Seiten-Linie d. Profils
  144.        (setq SS1 (ssadd (entlast) SS1))
  145.        (command EAITlin END1 (polar END1 WIZ (nth Z LI)) "") ;Seiten-Linie d. Profils
  146.        (setq SS1 (ssadd (entlast) SS1))
  147.  
  148.     );cond "T80-45S"
  149.     
  150.     ((OR (= "T80-45B" PROFIL) (= "T120-45B" PROFIL))
  151.  
  152.        (command EAITlay EAITlse "EAIT50" "")
  153.        (setq END1 (polar EPKT WIN LA))    
  154.        (command EAITlin EPKT END1 "")
  155.        (setq LIN (entlast)
  156.              SS1 (ssadd (entlast))
  157.              Z 0
  158.        )    
  159.  
  160. ;-----------Zeichnen des restlichen Profils    
  161.  
  162.        (command EAITlay EAITlse "EAIT25" "")
  163.        (command EAITlin (polar EPKT WIZ (nth Z LI))(polar END1 WIZ (nth Z LI)) "")
  164.        (setq SS1 (ssadd (entlast) SS1))
  165.        (setq Z (1+ Z))
  166.        (command EAITlay EAITlse "EAIT50" "")
  167.        (command EAITlin (polar EPKT WIZ (nth Z LI))(polar END1 WIZ (nth Z LI)) "")
  168.        (setq SS1 (ssadd (entlast) SS1))
  169.     
  170.        (command EAITlin EPKT (polar EPKT WIZ (nth Z LI)) "") ;Seiten-Linie d. Profils
  171.        (setq SS1 (ssadd (entlast) SS1))
  172.        (command EAITlin END1 (polar END1 WIZ (nth Z LI)) "") ;Seiten-Linie d. Profils
  173.        (setq SS1 (ssadd (entlast) SS1))
  174.  
  175.     );cond "T80-45B" oder "T120-45B"
  176.     
  177.     ((OR (= "D40" PROFIL) (= "D80" PROFIL))
  178.  
  179.        (command EAITlay EAITlse "EAIT50" "")
  180.        (setq END1 (polar EPKT WIN LA))    
  181.        (command EAITlin EPKT END1 "")
  182.        (setq LIN (entlast)
  183.              SS1 (ssadd (entlast))
  184.              Z 0
  185.        )    
  186.  
  187. ;-----------Zeichnen des restlichen Profils    
  188.  
  189.        (command EAITlay EAITlse "EAIT25" "")
  190.        (command EAITlin EPKT (polar END1 WIZ (nth Z LI)) "")
  191.        (setq SS1 (ssadd (entlast) SS1))
  192.  
  193.        (command EAITlay EAITlse "EAIT25" "")
  194.        (command EAITlin (polar EPKT WIZ (nth Z LI)) END1 "")
  195.        (setq SS1 (ssadd (entlast) SS1))
  196.  
  197.        (command EAITlay EAITlse "EAIT50" "")
  198.        (command EAITlin (polar EPKT WIZ (nth Z LI))(polar END1 WIZ (nth Z LI)) "")
  199.        (setq SS1 (ssadd (entlast) SS1))
  200.     
  201.        (command EAITlin EPKT (polar EPKT WIZ (nth Z LI)) "") ;Seiten-Linie d. Profils
  202.        (setq SS1 (ssadd (entlast) SS1))
  203.        (command EAITlin END1 (polar END1 WIZ (nth Z LI)) "") ;Seiten-Linie d. Profils
  204.        (setq SS1 (ssadd (entlast) SS1))
  205.  
  206.     );cond "D40" oder "D80"
  207.     
  208.     (T
  209.  
  210.        (command EAITlay EAITlse "EAIT50" "")
  211.        (setq END1 (polar EPKT WIN LA))    
  212.        (command EAITlin EPKT END1 "")
  213.        (setq LIN (entlast)
  214.              SS1 (ssadd (entlast))
  215.              Z -1
  216.        )    
  217.  
  218. ;-----------Zeichnen des restlichen Profils    
  219.  
  220.        (foreach N LI
  221.                (command EAITkop LIN "" EPKT (polar EPKT WIZ N))
  222.                (setq SS1 (ssadd (entlast) SS1))
  223.                (setq Z (1+ Z))
  224.        );foreach
  225.     
  226.        (command EAITlin EPKT (polar EPKT WIZ (nth Z LI)) "") ;Seiten-Linie d. Profils
  227.        (setq SS1 (ssadd (entlast) SS1))
  228.        (command EAITlin END1 (polar END1 WIZ (nth Z LI)) "") ;Seiten-Linie d. Profils
  229.        (setq SS1 (ssadd (entlast) SS1))
  230.  
  231.     );cond T
  232. );cond
  233. ;-----------Block bilden    
  234.  
  235.        (setq BName (EAITbnr))
  236.        (command EAITblo BName EPKT SS1 ""
  237.                 EAITege BName EPKT "" "" "" )
  238.  
  239. );defun EAITproI
  240.